import type { ComputedRef } from 'vue'
import type { EmployeeInfo } from '@/hooks/employee.hook.type.ts'

export interface SearchForm {
  name: string,
}

export interface Search {
  form: SearchForm
}

/**********************************************************************************/

export interface Table {
  height: number,
  list: EmployeeInfo[],
  total: number,
  $name: ComputedRef<string>,
  $location: ComputedRef<string>,
  $pageSize: ComputedRef<number>,
  $currentPage: ComputedRef<number>,
  currentEmployee: EmployeeInfo
}

export interface Pagination {
  pageSize: number,
  currentPage: number,
  $total: ComputedRef<number>
}

export enum DialogType {
  Unknown,
  Add,
  Update,
}

export interface Dialog {
  title: string,
  width: number,
  height: number,
  visible: boolean,
  form: EmployeeInfo,
  $currentEmployee: ComputedRef<EmployeeInfo>,
  type: DialogType,
}

